package com.study.scheduled.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyTask implements Runnable
{
    private static final Log log= LogFactory.getLog(MyTask.class);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private final String param;
    public MyTask(String param)
    {
        this.param = param;
    }

    @Override
    public void run()
    {
        log.info("-------------------------------->param:"+param+"---"+date());
    }

    public String date()
    {
        return sdf.format(new Date());
    }
}
